import request from '@/utils/request'

// 查询采购计划列表
export function listPlan(query) {
  return request({
    url: '/plan/plan/list',
    method: 'get',
    params: query
  })
}
export function report(query) {
  return request({
    url: '/plan/plan/report',
    method: 'get',
    params: query
  })
}
export function screen(query) {
  return request({
    url: '/plan/plan/screen',
    method: 'get',
    params: query
  })
}
export function listPlanNoPage(query) {
  return request({
    url: '/plan/plan/listNoPage',
    method: 'get',
    params: query
  })
}

export function listInfoPlan(query) {
  return request({
    url: '/plan/plan/listInfo',
    method: 'get',
    params: query
  })
}


export function query7days(query) {
  return request({
    url: '/plan/plan/7days',
    method: 'get',
    params: query
  })
}



export function examScoreStatistics(query) {
  return request({
    url: '/plan/plan/examScoreStatistics',
    method: 'get',
    params: query
  })
}


export function tankChart(query) {
  return request({
    url: '/plan/plan/tankChart',
    method: 'get',
    params: query
  })
}
export function getRefineryAllocations(query) {
  return request({
    url: '/plan/plan/getRefineryAllocations',
    method: 'get',
    params: query
  })
}
// 查询采购计划详细
export function getPlan(id) {
  return request({
    url: '/plan/plan/' + id,
    method: 'get'
  })
}

// 新增采购计划
export function addPlan(data) {
  return request({
    url: '/plan/plan',
    method: 'post',
    data: data
  })
}

// 修改采购计划
export function updatePlan(data) {
  return request({
    url: '/plan/plan',
    method: 'put',
    data: data
  })
}

// 删除采购计划
export function delPlan(id) {
  return request({
    url: '/plan/plan/' + id,
    method: 'delete'
  })
}
